/***************************************************************************
* File name    :	Type.h
* Function     :
* Author       :
* Date         :
* Version      :
* Description  :
* ModifyRecord :
***************************************************************************/
#ifndef __TYPE_H__
#define __TYPE_H__

	//------- BOOL type definition --------------

	#ifndef	_BOOL_TYPE_
	#define	_BOOL_TYPE_

#ifdef _MSC_VER
typedef int BOOL;
#else 
typedef	unsigned char BOOL;
#endif
	
	#define FALSE	0
	#define TRUE	1
	#define false 	0
	#define true  	1
	#define NULL 0
	#endif

	//------- UINT8 type definition --------------
	#ifndef	_UINT8_TYPE_
	#define _UINT8_TYPE_
	typedef unsigned char UINT8;
	#endif

	//------- UINT16 type definition --------------
	#ifndef	_UINT16_TYPE_
	#define _UINT16_TYPE_
	typedef unsigned short UINT16;
	#endif

	//------- UINT32 type definition --------------
	#ifndef	_UINT32_TYPE_
	#define _UINT32_TYPE_
	typedef unsigned int UINT32;
	#endif

	//------- UINT64 type definition --------------
	#ifndef	_UINT64_TYPE_
	#define _UINT64_TYPE_
	typedef unsigned long long UINT64;
	#endif

	//-------- INT8 type definition --------------
	#ifndef	_INT8_TYPE_
	#define _INT8_TYPE_
	typedef signed char INT8;
	#endif

	//-------- INT16 type definition --------------
	#ifndef	_INT16_TYPE_
	#define _INT16_TYPE_
	typedef short INT16;
	#endif

	//-------- INT32 type definition --------------
	#ifndef	_INT32_TYPE_
	#define _INT32_TYPE_
	typedef int INT32;
	#endif

	//------- INT64 type definition --------------
	#ifndef	_INT64_TYPE_
	#define _INT64_TYPE_
	typedef long long INT64;
	#endif

	//------- VUINT8 type definition --------------
	#ifndef	_VUINT8_TYPE_
	#define _VUINT8_TYPE_
	typedef volatile unsigned char VUINT8;
	#endif

	//------- VUINT16 type definition --------------
	#ifndef	_VUINT16_TYPE_
	#define _VUINT16_TYPE_
	typedef volatile unsigned short VUINT16;
	#endif

	//------- VUINT32 type definition --------------
	#ifndef	_VUINT32_TYPE_
	#define _VUINT32_TYPE_
	typedef volatile unsigned int VUINT32;
	#endif
	
	//--------------return code-------------
	#define RT_OK            0x00 //success
	#define RT_FAIL          0x01  //fail
	#define RT_COMMAND_ERR   0x02  //command error
	#define RT_PARAM_ERR     0x03  //param error
	#define RT_OVERTIME      0x04  //over time
	#define RT_ECC_ERR       0x05  //ecc error
	#define RT_WRITE_ERR     0x06  //write flash err
	#define RT_READ_ERR      0x07  //read flash err

	#define RT_LEN_ERR		 0xCCCC
	#define RT_CMD_ERR		 0xBBBB
	#define RT_SUCCESS		 0xAAAA

	extern char g_FlashPath[256];

#endif /*__TYPE_H__*/

